package com.evan.webadmin.biz.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.evan.webadmin.biz.model.ExamPaper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 试卷表 Mapper 接口
 * </p>
 *
 * @author Pavel
 * @since 2025-02-28
 */
public interface ExamPaperMapper extends BaseMapper<ExamPaper> {

    @Select("select * from biz_exam_paper where paper_id = #{paperId}")
    ExamPaper selectByPaperId(Long paperId);

    @Update("update biz_exam_paper set published = 0 where personnel_type = #{personnelType}")
    void resetPublish(int personnelType);
}
